/**
 * 
 */
package org.project.product.android.pfe.fanta.view;

import org.project.product.android.pfe.fanta.R;
import org.project.product.android.pfe.fanta.domain.Category;
import org.project.product.android.pfe.fanta.domain.Product;
import org.project.product.android.pfe.fanta.domain.User;
import org.project.product.android.pfe.fanta.util.Utils;
import org.project.product.android.pfe_fanta.EditOrDeleteCategoryActivity;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

/**
 * @author JBromo
 * 
 */
public class UserItemView extends LinearLayout {

	private TextView matricule;
	private TextView login;

	public UserItemView(Context context, User item) {
		super(context);
		LayoutInflater.from(context)
				.inflate(R.layout.user_item, this, true);
		initView();
		reuse(item);
	}

	private void initView() {
		matricule = (TextView) findViewById(R.id.user_matricule);
		login = (TextView) findViewById(R.id.user_login);
		
		
		

	}

	public void reuse(final User item) {
		matricule.setText("Matricule :"+item.getMatricule());
		login.setText("Login  :"+item.getLogin());
		
	}
}
